/**
 * 线程统计时间.
 * @param evt.data
 * @param evt.data.webAppRoot 根路径
 * @param evt.data.paramData 参数
 */
onmessage=function(evt){
	var sysParams = evt.data;
	var token = sysParams.ecp_token;
	var name = sysParams.serviceName;
	var headers = sysParams.headers;
	var remoteService = sysParams.webAppRoot+"/ecp/webcore/remoteService?ecp_token="+token+"&name="+name;
    var xmlHttp = new XMLHttpRequest();	        
    xmlHttp.open("POST", remoteService);
    xmlHttp.setRequestHeader("Content-Type", 
    		"application/x-www-form-urlencoded;charset=UTF-8");
    if(headers != null) {
	    for(var key in headers) {
	        xmlHttp.setRequestHeader(key, headers[key]);
	    }
    }
    xmlHttp.send(sysParams.paramData);	        
    xmlHttp.onreadystatechange = function() {
    	if((xmlHttp.readyState == 4) && (xmlHttp.status == 200)) {
    		postMessage(xmlHttp.responseText);
    	}
    }
}